<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('House_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="booking/house/index" data-field="name" class="form-control selectpage" name="row[source_id]" type="text" value="{$house_id}">
        </div>
    </div>
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Coupon_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-coupon_id" data-rule="required" data-source="coupon/index" class="form-control selectpage" name="row[coupon_id]" type="text" value="">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-amount" class="form-control" step="0.01" name="row[amount]" type="number" value="{$money}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payamount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-payamount" class="form-control" step="0.01" name="row[payamount]" type="number" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Checkin_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-checkin_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[checkin_time]" type="text" value="{$checkin_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Leave_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-leave_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[leave_time]" type="text" value="{$leave_time}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Lodgers')}:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-template="lodgerstpl" data-name="row[lodgers]">
                <dd>
                    <ins style="width:90px;">{:__('姓名')}</ins>
                    <ins>{:__('手机号码')}</ins>
                    <ins style="width:90px;">{:__('证件类型')}</ins>
                    <ins>{:__('证件号码')}</ins>
                </dd>
                <dd><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></dd>

                <textarea name="row[lodgers]" class="form-control hide" cols="30" rows="5">[]</textarea>
            </dl>
            <script id="lodgerstpl" type="text/html">
                <dd class="form-inline">
                    <ins style="width:90px;"><input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row.name%>" placeholder="姓名" style="width:90px;"/></ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][mobile]" class="form-control" value="<%=row.mobile%>" placeholder="手机号码"/></ins>
                    <ins style="width:90px;">
                        <select id="c-to_shop_pay" class="form-control selectpicker" name="<%=name%>[<%=index%>][type]">
                            <option value="0" <%=row.type=='0'?'selected':''%> >身份证</option>
                            <option value="1" <%=row.type=='1'?'selected':''%> >护照</option>
                            <option value="2" <%=row.type=='2'?'selected':''%> >港澳通行证</option>
                            <option value="3" <%=row.type=='3'?'selected':''%> >台胞证</option>
                        </select>
                    </ins>
                    <ins><input type="text" name="<%=name%>[<%=index%>][idnumber]" class="form-control" value="<%=row.idnumber%>" placeholder="证件号码"/></ins>
                    <!--下面的两个按钮务必保留-->
                    <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                    <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                </dd>
            </script>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-memo" class="form-control" name="row[memo]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value=""}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
